package com.my.study.config.hook.bean;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author: yidujun
 * @create: 2021/04/02 16:44
 */
@Component
@Slf4j
@Scope(value = "prototype")
public class AllStrategiesExampleBean implements InitializingBean {
    public AllStrategiesExampleBean() {
        log.info("[AllStrategiesExampleBean -> Constructor]");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        log.info("[AllStrategiesExampleBean -> InitializingBean]");
    }

    @PostConstruct
    public void postConstruct() {
        log.info("[AllStrategiesExampleBean -> PostConstruct]");
    }

    public void init() {
        log.info("[AllStrategiesExampleBean -> init-method]");
    }
}
